﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using VisionCloud.Core.Model.Ms;
using VisionCloud.Domain.Repository.Interface.Ms;

namespace VisionCloud.Domain.Repository.Implement.Ms
{
    public class MsTaskStandardRepository : BaseRepository<MsTaskStandard>, IMsTaskStandardRepository
    {
        /// <summary>
        /// 获取任务标准测量项
        /// </summary>
        /// <param name="taskId">任务Id</param>
        /// <returns></returns>
        public async Task<List<MsTaskStandard>> GetTaskStandards(Guid taskId)
        {
            return await (
                    from h in Db.MsTaskStandards
                    where h.TaskId == taskId
                    select h).AsNoTracking().ToListAsync();
        }
    }
}
